global_defs {
    router_id lb-backup-{{ inventory_hostname.split('.')[-1] }}
}

vrrp_script check-haproxy {
    script "killall -0 haproxy"
    interval 5
    weight -30
}

vrrp_instance VI-kube-master {
    state BACKUP
    priority 110
    dont_track_primary
    interface {{ ansible_default_ipv4['interface'] }}
    nopreempt
    virtual_router_id 68
    advert_int 3
    track_script {
        check-haproxy
    }
    virtual_ipaddress {
        {{vip}}
    }
}